/*
 * topology.h
 *
 *  Created on: Sep 6, 2013
 *      Author: cinus
 */

#ifndef TOPOLOGY_H_
#define TOPOLOGY_H_

#include "types.h"
#include "net.h"

struct index {
	uint16 layer;
	uint16 pos;
};
typedef struct index index_t;

struct topology {
	uint16 layers;
	uint32* neurons;
	//cannot use the typedef
	//float32 (**activationFunctions)(struct netdata*, float32);
	float32 (**activationFunctions)(netdata_tp, float32);
	float32 (**diffActivationFunctions)(netdata_tp, float32);
	uint32** connections;
	index_t* indexes;
	float32 (*errorFunction)(float32 *output, float32 *target, size_t size);
};

typedef struct topology topology_t;
typedef topology_t* topology_tp;

uint8 readTopology(topology_t* tp, int8* filename);
void freeTopology(topology_t* tp);
#endif /* TOPOLOGY_H_ */
